<template>
  <div class="home-product">
    <ul>
      <li v-for="item in brandlist" :key="item.id">
        <img :src="item.pic_url" alt="" />
        <h4>{{ item.name }}</h4>
      </li>
    </ul>
  </div>
</template>

<script setup>
const brandlist = [
  { id: 1, name: "直播", pic_url: "/images/product1.png" },
  { id: 2, name: "推荐", pic_url: "/images/product2.png" },
  { id: 3, name: "补贴", pic_url: "/images/product3.png" },
  { id: 4, name: "分享", pic_url: "/images/product4.png" }
];
</script>

<style lang="less" scoped>
.home-product > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  li {
    width: 49.5%;
    position: relative;
    img {
      width: 100%;
    }
    h4 {
      position: absolute;
      font-size: 14px;
      background: red;
      left: 2px;
      top: -17px;
      border-radius: 10%;
      color: white;
    }
  }
}
</style>
